﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;

/// <summary>
/// Summary description for clsDONGPHI_CHINHANH
/// </summary>
public class clsDONGPHI_CHINHANH
{
	public clsDONGPHI_CHINHANH()
	{
		//
		// TODO: Add constructor logic here
		//
	}
    #region Insert
    public static string Insert(Guid F_STT, string F_MACN)
    {
        DatabaseConnect connect = new DatabaseConnect();
        // Tham so
        object[] values = { F_STT, F_MACN };
        string[] parameters = { "@F_STT", "@F_MACN" };
        SqlParameter[] para = new SqlParameter[parameters.Length];
        for (int i = 0; i < parameters.Length; i++)
        {
            para[i] = new SqlParameter(parameters[i], values[i]);
        }
        try
        {
            connect.ExecuteQuery("tbDONGPHI_CHINHANH_Insert", para);
            return "OK";
        }
        catch
        {
            return "ERR";
        }
    }
    #endregion
    public static string DanhDauDaLuuRaHoaDon(Guid F_STT, string F_MACN)
    {
        DatabaseConnect connect = new DatabaseConnect();
        // Tham so
        object[] values = { F_STT, F_MACN };
        string[] parameters = { "@F_STT", "@F_MACN" };
        SqlParameter[] para = new SqlParameter[parameters.Length];
        for (int i = 0; i < parameters.Length; i++)
        {
            para[i] = new SqlParameter(parameters[i], values[i]);
        }
        try
        {
            connect.ExecuteQuery("tbDONGPHI_CHINHANH_DanhDauDaLuuRaHoaDon", para);
            return "OK";
        }
        catch
        {
            return "ERR";
        }
    }
}